﻿using System.Linq.Expressions;

namespace BlazorDemo.Data
{
    public interface IZsg
    {
        List<T> GetList<T>(ref int Count, int Skip = 1, int Task = 8) where T : class;
        Task<List<T>> GetList<T>(Expression<Func<T, bool>>? values = null, int Skip = 1, int Task = 8, int Count = 0) where T : class;
        Task<string> GetList<T>(int Skip, int Task) where T : class;
        Task<List<T>> GetList<T>(Expression<Func<T, bool>> predicate, int pageNumber, int pageSize) where T : class;
        Task<List<T>> GetList<T>(IQueryable<T> predicate, int pageNumber = 1, int pageSize = 9999) where T : class;
        /// <summary>
        /// 删除
        /// </summary>
        Task<string> Del<T>(int id) where T : class;
        /// <summary>
        /// 添加
        /// </summary>
        Task<string> Add<T>(int id, T data) where T : class;
        /// <summary>
        /// 修改
        /// </summary>
        Task<string> Put<T>(int id, T data) where T : class;

        Task<T> GetOne<T>(int id) where T : class;
        void ShowMess(string successMessage, EShowMess mess);
      
    }
}
